#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
from dbConnection.MysqlConn import Mysql
reload(sys)
sys.setdefaultencoding('utf8')


# 获取讲师列表
def get_teacher():
    sql = "select uid, nickName FROM girl_teacher WHERE status = 1"
    mysql = Mysql()
    res = mysql.getAll(sql, None)
    mysql.dispose()
    return res


# 获取大类
def get_subject():
    sql = "select sid, typeName FROM girl_subject"
    mysql = Mysql()
    res = mysql.getAll(sql, None)
    mysql.dispose()
    return res


# 获取小类
def get_type():
    sql = "select tid, courseName FROM girl_type"
    mysql = Mysql()
    res = mysql.getAll(sql, None)
    mysql.dispose()
    return res


# 获取课程列表
def get_course():
    sql = "select cid, courseName FROM girl_course"
    mysql = Mysql()
    res = mysql.getAll(sql, None)
    mysql.dispose()
    return res